<template>
<div class="sidebar">
  <el-container style="height: 47vw; border: 1px solid #eee">
    <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
      <el-menu :default-openeds="['1', '3']">
        <el-menu-item index="1" @click="memberClick" ><i class="el-icon-message"></i>成员</el-menu-item>
        <el-menu-item index="2" @click="newsClick" ><i class="el-icon-message"></i>新闻</el-menu-item>
        <el-menu-item index="3" @click="projectClick" ><i class="el-icon-message"></i>项目</el-menu-item>
        <el-submenu index="4">
          <template slot="title"><i class="el-icon-message"></i>风采</template>
          <el-menu-item-group>
<!--            <template slot="title"></template>-->
            <el-menu-item index="1-1" @click="projectawardClick">项目获奖名单</el-menu-item>
            <el-menu-item index="1-2" @click="copyrightsClick">软著名单</el-menu-item>
            <el-menu-item index="1-3" @click="competitionClick">赛事获奖名单</el-menu-item>

                      </el-menu-item-group>
<!--          <el-submenu index="1-4">-->
<!--            <template slot="title">选项4</template>-->
<!--            <el-menu-item index="1-4-1">选项4-1</el-menu-item>-->
<!--          </el-submenu>-->
        </el-submenu>
        <el-submenu index="5">
          <template slot="title"><i class="el-icon-message"></i>关于我们</template>
          <el-menu-item-group>
            <!--            <template slot="title"></template>-->
            <el-menu-item index="1-1" @click="directionClick">学习方向</el-menu-item>
            <el-menu-item index="1-2" @click="historyClick">发展历程</el-menu-item>
            <el-menu-item index="1-3" @click="systemClick">工作室制度</el-menu-item>

          </el-menu-item-group>
          <!--          <el-submenu index="1-4">-->
          <!--            <template slot="title">选项4</template>-->
          <!--            <el-menu-item index="1-4-1">选项4-1</el-menu-item>-->
          <!--          </el-submenu>-->
        </el-submenu>

      </el-menu>
    </el-aside>
    <el-container >
      <div class="aaa">
        <!--       头信息-->
        <div class="page-header">
          <h1>Banner后台管理系统
          </h1>

        </div>
        <router-view></router-view>
      </div>

    </el-container>
  </el-container>
</div>
</template>

<script>
export default {
  name: "BannerAdmin",
  methods: {
    memberClick() {
      this.$router.push('/banneradmin/member');
    },
    newsClick() {
      this.$router.push('/banneradmin/news');
    },
    projectClick() {
      this.$router.push('/banneradmin/project');
    },
    projectawardClick() {
      this.$router.push('/banneradmin/projectaward');
    },
    copyrightsClick() {
      this.$router.push('/banneradmin/copyrights');
    },
    competitionClick() {
      this.$router.push('/banneradmin/competition');
    },
    directionClick() {
      this.$router.push('/banneradmin/direction');
    },
    historyClick() {
      this.$router.push('/banneradmin/history');
    },
    systemClick() {
      this.$router.push('/banneradmin/system');
    },

  },
  // created() {
  //   if(this.$store.state.User.admin===false){
  //     this.$router.push('/login');
  //   }
  // }
}

</script>

<style lang="less" scoped>
.el-header {
  background-color: #B3C0D1;
  color: #333;
  line-height: 60px;
}

.el-aside {
  color: #333;
}
.aaa {
  margin-left: 150px;
}
// 用户信息
.page-header{
  h1>a{
    position: absolute;
    right: 20px;
    top: 70px;
    font-size: 18px;
  }
}

</style>
